import http from '@/utils/httpRequest'
import { debug } from 'util'
export default {
    /** 字典表--列表  **/
  getDictList (param) {
    return http.post(http.adornUrl('init/dict/getDictList'), param)
  },
  getAdminDictList (param) {
    return http.post(http.adornUrl('init/dict/getAdminDictList'), param)
  },
    // 刷新分润
  freshProfit () {
    return http.get(http.adornUrl('api/myProfit'))
  },
    // 修改供应商登录密码
  changeSupplierPassword (param) {
    return http.post(http.adornUrl('sys/user/updateDelearPwd'), param)
  },
    // 设置帐号异常状态
  changeAccountStatus (param) {
    return http.post(http.adornUrl('sys/user/updateAbnormalState'), param)
  },
    /** * 获取体验区可以勾选的商品列表  **/
  getExperienceNoSelect (param) {
    return http.get(http.adornUrl('goods/yjgoods/displayArea'), { params: param })
  },
    /** 获取后台用户用以绑定供应商 **/
  getAdminUserList (param) {
    return http.post(http.adornUrl('api/getAdminUserInfo'), param)
  },
    // 用户和供应商绑定
  bindAdminUser (param) {
    return http.post(http.adornUrl('dealers/saveUser'), param)
  },
    /** * 保存选择的商品 **/
  saveMySelectGoods (param) {
    return http.post(http.adornUrl(`goods/yjgoods/displaySave`), param)
  },
    /** 充值记录 **/
  chargeRecodeDetail (param) {
    return http.post(http.adornUrl(`yjPsv/adminSelect`), param)
  },
    /** 易货积分明细  **/
  barterSendDetail (param) {
    return http.post(http.adornUrl(`yjPsv/sendcredits/list`), param)
  },
    /** 字典表--删除  **/
  delDictItem (param) {
    return http.post(http.adornUrl('init/dict/delDictItem'), param)
  },

    /** 字典表--清除  **/
  clearDict () {
    return http.post(http.adornUrl('init/dict/clearReids'))
  },

    /** 字典表--更新  **/
  updateDict (param) {
    return http.post(http.adornUrl('init/dict/updateDict'), param)
  },
    /** 广告--列表  **/
  getAdvList (param) {
    return http.get(http.adornUrl('banner/list'), { params: param })
  },
    /** 广告--详情  **/
  AdvDetail (param) {
    return http.post(http.adornUrl(`banner/info/${id}`), param)
  },
    /** 广告--更新  **/
  Advsave (param) {
    return http.post(http.adornUrl('banner/save'), param)
  },
    /** 广告--删除  **/
  AdvDelete (id) {
    return http.delete(http.adornUrl(`banner/delete/${id}`))
  },
    /** 首页文字滚动设置--列表  **/
  getTextList (param) {
    return http.get(http.adornUrl('bannertext/list'), {
      params: param
    })
  },
    /** 获取红包记录  **/
  getRedPocket (param) {
    return http.get(http.adornUrl('redrecord/list'), {
      params: param
    })
  },
    /** 首页文字滚动设置--更新  **/
  addTextset (param) {
    return http.post(http.adornUrl('bannertext/save'), param)
  },
    /** 用户批发券  **/
  userCup (param) {
    return http.post(http.adornUrl(`sys/yjopterlog/save`), param)
  },
    /** 获取协议列表 */
  getProtocols (param) {
    return http.get(http.adornUrl(`protocol/list`), { params: param })
  },
    /** 删除单条协议 */
  deleteProtocol (id) {
    return http.get(http.adornUrl(`protocol/delete/${id}`))
  },
    /** 协议修改/新增 */
  savePro (param) {
    return http.post(http.adornUrl('protocol/save'), param)
  },
    /** 获取银行卡列表 */
  getBankList (param) {
    return http.get(http.adornUrl('bank/bind/list'), { params: param })
        // return http.get(http.adornUrl("yjCash/bandapplylist"), { params: param });
  },

    /** 支付宝列表 */
  applyList (param) {
    return http.get(http.adornUrl('/apply/list'), { params: param })
        // return http.get(http.adornUrl("yjCash/bandapplylist"), { params: param });
  },
    /** 删除银行卡信息 */
  deleteBankCard (id) {
    return http.delete(http.adornUrl(`bank/bind/delete/${id}`))
  },
  deleteAli (id) {
    return http.delete(http.adornUrl(`apply/delete/${id}`))
  },

    /** 修改  新建银行卡信息 */
  saveCard (param) {
    return http.post(http.adornUrl('bank/bind/save'), param)
  },

  saveAli (param) {
    return http.post(http.adornUrl('/apply/save'), param)
  },
    /** 地址列表 */
  adressList (param) {
    return http.get(http.adornUrl('address/list'), { params: param })
  },
    /** 地址新建 修改 */
  saveAddress (param) {
    return http.post(http.adornUrl('address/save'), param)
  },
    /** 地址删除 */
  delAddress (id) {
    return http.delete(http.adornUrl(`address/delete/${id}`))
  },
    /** 活动列表 */
  activityList (param) {
    return http.get(http.adornUrl('activity/list'), { params: param })
  },
    /** 保存新增活动 */
  saveActivity (param) {
    return http.post(http.adornUrl('activity/save'), param)
  },
    /** 删除活动 */
  delActivity (id) {
    return http.delete(http.adornUrl(`activity/delete/${id}`))
  },
    /** 活动商品管理 */
  saveGoodsManage (param) {
    return http.post(http.adornUrl('activity/save/goods'), param)
  },
    /** 结束活动 */
  endActivity (param) {
    return http.post(http.adornUrl(`activity/endActivity`), param)
  },
    /** 商品列表  **/
  goodsList (param) {
    return http.get(http.adornUrl('goods/yjgoods/list'), { params: param })
  },
  goodsListSimpleSpec (param) {
    return http.get(http.adornUrl('goods/yjgoods/lists'), { params: param })
  },
    /** 活动下的商品 */
  getGoodsByActId (param) {
    return http.post(http.adornUrl('sysAdmin/getGoodsByActId'), param)
  },
    /** 删除活动下的商品 */
  deleteActGoods (param) {
    return http.post(http.adornUrl('sysAdmin/deleteActGoods'), param)
  },

    /** 订单列表 */
  orderList (param) {
        // return http.get(http.adornUrl("order/adminlist"), { params: param });
    return http.get(http.adornUrl('order/goods/expOrderList'), {
      params: param
    })
  },
    /** 单条订单信息 */
  order_info (id) {
    return http.get(http.adornUrl(`order/info/${id}`))
  },
    /** 查询物流公司 */
  expressList (param) {
    return http.get(http.adornUrl('express/list'), { params: param })
  },
    /** 发货按钮 */
  sendDelivery (param) {
    return http.post(http.adornUrl('order/deliver'), param)
  },
    /** 是否同意退款 */
  refund_whether (param) {
    return http.post(http.adornUrl('order/whether/refund'), param)
  },
    /** 是否同意退货 */
  returned_whether (param) {
    return http.post(http.adornUrl('order/whether/returned'), param)
  },
    /** 确认收货 */
  confirm_return (param) {
    return http.post(http.adornUrl('order/confirm/receiving'), param)
  },
  appConfigList (param) {
    return http.get(http.adornUrl('appConfig/list'), { params: param })
  },
  appConfigSave (param) {
    return http.post(http.adornUrl('appConfig/save'), param)
  },
  appConfigDel (id) {
    return http.delete(http.adornUrl(`appConfig/delete/${id}`))
  },
    /** 获取代理商列表 */
  agencyList (param) {
    return http.post(http.adornUrl('sysUserAgent/selectUserAgent'), param)
  },

    /** 用户体系列表 */
  proceedsRewardlist (param) {
    return http.get(http.adornUrl('yjProceedsKpi/list'), { params: param })
  },
  proceedsRewardSave (param) {
    return http.post(http.adornUrl('yjProceedsKpi/save'), param)
  },
  yjProceedsKpiList (param) {
    return http.get(http.adornUrl('yjProceedsKpi/list'), { params: param })
  },
    /** 用户提现列表 */
  yjCashList (param) {
        // return http.get(http.adornUrl("yjCash/list"), { params: param })
    return http.post(http.adornUrl('yjCash/cashList'), param)
  },
  yjCashSave (param) {
    return http.post(http.adornUrl('yjCash/save'), param)
  },
    /** 删除代理商 */
  deleteAgency (id) {
    return http.delete(http.adornUrl(`sysUserAgent/delete/${id}`))
  },
    /** 修改代理商 */
  editAgency (param) {
    return http.post(http.adornUrl('sysUserAgent/updateUserAgent'), param)
  },
  privinceFreightSave (param) {
    return http.post(http.adornUrl('yjPrivinceFreight/save'), param)
  },
  privinceFreightUpdate (param) {
    return http.post(http.adornUrl('yjPrivinceFreight/update'), param)
  },
  privinceFreightList (param) {
    return http.post(http.adornUrl('yjPrivinceFreight/select'), param)
  },
  privinceFreightDel (param) {
    return http.post(http.adornUrl(`yjPrivinceFreight/delete/${param}`))
  },
    /** 代理商普通订单 */
  expDelearOrderList (param) {
    return http.get(http.adornUrl('order/goods/expDelearOrderList'), {
      params: param
    })
  },
    /** 代理商寄售订单 */
  expDelearWhoOrderList (param) {
    return http.get(http.adornUrl('order/goods/expDelearWhoOrderList'), {
      params: param
    })
  },
    /** 普通订单汇总 */
  expOrderListTotal (param) {
    return http.get(http.adornUrl('order/goods/expOrderListTotal'), {
      params: param
    })
  },
    /** 普通订单供应商汇总 */
  expDelearOrderListTotal (param) {
    return http.get(http.adornUrl('order/goods/expDelearOrderListTotal'), {
      params: param
    })
  },
  getOrderAddressInfo (param) {
    return http.get(http.adornUrl('order/goods/getOrderAddressInfo'), {
      params: param
    })
  },
  appConfigList (param) {
    return http.get(http.adornUrl('admin/app/config/list'), { params: param })
  },
  appConfigSave (param) {
    return http.post(http.adornUrl('admin/app/config/save'), param)
  },
  appConfigDel (id) {
    return http.delete(http.adornUrl(`admin/app/config/delete/${id}`))
  },
  appConfigUpdate (param) {
    return http.put(http.adornUrl('admin/app/config/update'), param)
  },

    //     order/goods/expOrderListTotal  除分页参数不给，其他参数和之前一样的  普通订单
    // order/goods/expDelearOrderListTotal   除分页参数不给，其他参数和之前一样的  普通订单供应商
    // 订单地址详情接口    order/goods/getOrderAddressInfo    orderNo 订单号

// 首页统计
/** 商家或平台简单统计 */
  statisticsSingle () {
    return http.get(http.adornUrl('admin/order/statistics/single'))
  },
/** 用户总览 */
  memberStatistics () {
    return http.get(http.adornUrl('admin/account/member-statistics'))
  },
  goodStatistics () {
    return http.get(http.adornUrl('admin/goods/goods-statistics'))
  },

  statisticsOrderNum (param) {
    return http.get(http.adornUrl('admin/order/statistics-order-num/year-on-year'), { params: param })
  },
  statisticsMoney (param) {
    return http.get(http.adornUrl('admin/order/statistics-order-amount/year-on-year'), { params: param })
  },
  statisticsBuyDays (param) {
    return http.get(http.adornUrl('admin/order/statistics/buy-days'), { params: param })
  },
  customerLogin (param) {
    return http.post(http.adornUrl('api/im/customerLogin'), param)
  }
}
